#include "esptimer.h"

void esptimer_callback(void *arg)
{
    LED_TOGGLE();
}
void esptimer_init(uint64_t tps)
{
    esp_timer_create_args_t timer_create = {
        .callback = esptimer_callback,
        .arg = NULL,
        .dispatch_method = ESP_TIMER_TASK,
        .name = "Timer",
    };
    esp_timer_handle_t timer_handle;
    esp_timer_create(&timer_create, &timer_handle);
    esp_timer_start_periodic(timer_handle, tps);
}
